package it.eng.area118.mdocommon.android.rest;

import it.eng.area118.mdocommon.ServiceEndPoint;

/**
 * 
 * @author Luigi Bifulco
 * 
 * @param <Result>
 */
public class RestServiceEndPoint<Result> implements ServiceEndPoint<Result> {

	protected String host;

	protected int port;

	protected String service;

	protected String query;

	protected String method;

	protected Class<Result> resultType;

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getService() {
		return service;
	}

	public void setService(String service) {
		this.service = service;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

	public String getServiceURL() {
		return "http://" + host + ":" + port + "/" + service + "/" + query;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public Class<Result> getResultType() {
		return resultType;
	}

	public void setResultType(Class<Result> resultType) {
		this.resultType = resultType;
	}

	@Override
	public String toString() {
		return "RestServiceEndPoint [host=" + host + ", port=" + port + ", service=" + service + ", query=" + query
				+ ", method=" + method + ", resultType=" + resultType + "]";
	}

}
